//
//  UILabel+Extension.swift
//  Home_school_晓林
//
//  Created by 张晓林 on 16/9/22.
//  Copyright © 2016年 张晓林. All rights reserved.
//

import UIKit

extension UILabel {

    /// 便利构造方法
    ///
    /// - parameter frame:     frame
    /// - parameter title:     标题
    /// - parameter alignment: 居中模式
    /// - parameter color:     字体颜色
    /// - parameter fontSize:  字体大小
    ///
    /// - returns: 标签视图
    convenience init(frame: CGRect,title: String, alignment:NSTextAlignment = .center, color: UIColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1),fontSize:CGFloat = 14) {
        self.init(frame: frame)
        text = title
        textAlignment = alignment
        textColor = color
        font = UIFont.systemFont(ofSize: fontSize)
    }
}
